import { http } from "@/utils/http";
import { AxiosPromise } from "axios";

export function recordDetail(id: string): AxiosPromise<any> {
  return http.request({
    url: "/wiki/record/" + id,
    method: "get"
  });
}

export function saveRecord(data: any): AxiosPromise<any> {
  return http.request({
    url: '/wiki/record',
    method: 'post',
    data
  });
}

export function updateRecord(data: any): AxiosPromise<any> {
  return http.request({
    url: '/wiki/record',
    method: 'put',
    data
  });
}